<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
#div1 {
	width:200px;
	height:200px;
	background:red;
}
</style>
<script>
function toGreen()
{
	var oDiv=document.getElementById('div1');
	
	oDiv.style.width='300px';
	oDiv.style.height='300px';
	oDiv.style.background='green';
}

function toRed()
{
	var oDiv=document.getElementById('div1');
	
	oDiv.style.width='200px';
	oDiv.style.height='200px';
	oDiv.style.background='red';
}
</script>
</head>

<body>
<div id="div1" onmouseover="toGreen()" onmouseout="toRed()">
</div>
</body>
</html>
